﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Web;
using System.Web.Configuration;

namespace IXION.BLOG.COMMON.CONFIG
{
    public class ConfigWriter
    {
        public static void SaveOrUpdate(string key,string value) {
            Configuration config = WebConfigurationManager.OpenWebConfiguration("~");
            AppSettingsSection section = (AppSettingsSection)config.GetSection("appSettings");
            section.Settings[key].Value = value;
            config.Save();
        }
    }
}